<style>
.shine {color:#f60}
.fe-floatright-bottom {bottom:2.6rem}
.noread{
				height:8rem;
				overflow-y:hidden
}
.noread-btn {position: relative;padding-top:2rem;margin-top:-1.3rem}
.noread-btn .exp-mask {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 2rem;
				background-image: linear-gradient(-180deg,rgba(255,255,255,0) 13%,#fff 63%);
}
.fui-picture .image .playbtn {
    background: rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9;
	padding-top:4rem;
    text-align: center;
    color: #fff;
}
.live-living {
    height: 1rem;
    display: inline-block;
    border: 0 solid #ededed;
    -webkit-border-radius: 1rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.8) none repeat scroll 0 0;
    color: #fff;
    line-height: 0.9rem;
    font-size: 0.6rem;
    position: absolute;
    opacity: 0.8;
    padding: 0 0.5rem;
    left: 0.15rem;
    bottom: 0.3rem;
    z-index: 10;
}
.live-title {
    height: 1rem;
    display: inline-block;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.8) none repeat scroll 0 0;
    color: #fff;
    line-height: 0.9rem;
    font-size: 0.6rem;
    position: absolute;
    opacity: 0.8;
    padding: 0 0.5rem;
    top: 0;
    z-index: 10;
}
.live-living i{
	position: relative;
	width:1.05rem;
	height:1.05rem;
	display: inline-block;
	background: url("../addons/jy_weishop/resource/images/live-living.gif") no-repeat center;
	background-size: contain;
	-webkit-border-radius: 1rem;
	border-radius: 1rem;
	top: -1px;
	left: -1px;
	margin:0 0.1rem 0 0;
	margin-left:-0.55rem;
}
.live-hot-list-img img{width:100%;height:5.5rem;}
.fe-floatright-bottom a{
    background-color: rgba(0,0,0,0.2);
}
.followpiaofu img{width: 0px;position: fixed; bottom: 260px; right: 25px;z-index:188}
</style>
<div class="fui-page order-create-page fui-page-current">
	<div class="fui-content">
		<div class="followpiaofu"></div>
		<div class="fui-picture">
				<div class="image" ng-if="!pagedata.item.video || pagedata.item.noread" style="position: relative;display: block;" data-nocache="true">
					<img ng-src="{{tomedia(pagedata.item.thumb) || '../core/resource/images/nopic.jpg'}}">
					<div ng-if="pagedata.item.noread" class="playbtn">
						<div ng-if="pagedata.item.type!=2">
							<a ng-if="!pagedata.order_id" href="javascript:;" ng-click="pagedata.pay_submit({'video_id':pagedata.item.id},'jy_kexie/video_detail/pay/','jy_kexie/video_detail//id='+pagedata.item.id)" class="jylabel jylabel-success active">点击付费(￥{{pagedata.item.price}})</a>
							<a ng-if="pagedata.order_id" href="javascript:;" ng-click="pagedata.pay(pagedata.order_id)" class="jylabel jylabel-success active">点击付费(￥{{pagedata.item.price}})</a>
						</div>
						<div ng-if="pagedata.item.type==2">
							<a href="javascript:;" ng-click="access_json('jy_kexie/home/buyvip/')" class="jylabel jylabel-success active">点击开通(VIP课程)</a>
						</div>
					</div>
				</div>
				<video ng-if="pagedata.item.video && !pagedata.item.noread" style="width:100%;max-height:16rem" ng-src="{{tomedia(pagedata.item.video)}}" poster="{{tomedia(pagedata.item.image)}}" x5-playsinline="" playsinline="" webkit-playsinline="" preload="auto"  preload="auto" controls loop="loop">
				</video>
		</div>
		<div class="fui-cell-group fui-cell-click" style="padding-bottom:0.3rem;margin-top:0">
			<div class="fui-cell sm">
				<div class="fui-cell-text bold" style="font-size:1rem">{{pagedata.item.title}}</div>
			</div>
		</div>
		<div ng-if="pagedata.item.videos.length>0" class="fui-cell-group fui-cell-click" style="padding-bottom:0.3rem">
			<div class="fui-cell">
				<div class="fui-cell-text bold" style="font-size:0.8rem">相关课程</div>
			</div>
			<div class="fui-tab-scroll" style="margin-top:0.5rem;height: 6rem">
				<div class="fui-goods-item" style="border-bottom:0 solid #e7e7e7;width:7rem" ng-click="pagedata.item.video=item.video" ng-repeat="item in pagedata.item.videos">
					<div class="live-hot-list-inner" style="border-radius:0.2rem">
						<div class="live-hot-list-img">
							<span ng-if="pagedata.item.video==item.video" class="live-living">
								<i></i> 播放中
							</span>
							<span ng-if="pagedata.item.video!=item.video" class="live-living">
								点击播放
							</span>
							<div class="live-title">{{item.title}}</div>
							<img style="border-top-left-radius:0.2rem;border-top-right-radius:0.2rem;" ng-src="{{item.thumb || '../core/resource/images/nopic.jpg'}}" alt="{{item.title}}"/>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="fui-cell-group fui-cell-click" style="padding-bottom:0.3rem">
			<div class="fui-cell">
				<div class="fui-cell-text bold" style="font-size:0.8rem">推荐课程</div>
			</div>
			<div ng-if="pagedata.tuijievideos.length>0" class="fui-tab-scroll" style="margin-top:0.5rem;height: 5.5rem">
				<div class="fui-goods-item" href="javascript:;" ng-click="access_json('jy_kexie/video_detail//id='+item.id)" style="border-radius: .5rem;border: 1px solid #ebebeb;margin-left:0.3rem;" ng-repeat="item in pagedata.tuijievideos">
					<div>
						<div class="image" style="background-image: url({{tomedia(item.thumb) ||'../core/resource/images/nopic.jpg'}})">
						</div>
					</div>
					<div class="detail" style="padding-top:0.3rem">
						<div>
							<div class="name ng-binding">
								{{item.title}}
							</div>
						</div>
						<div class="price" style="margin-top: 1.6rem">
							<span ng-if="item.type==1" class="text">￥{{item.price}}</span>
							<span ng-if="item.type==2" class="text">VIP课程</span>
							<span ng-if="item.type==0" class="text">免费</span>
							<span class="buy" style="margin-left:0.5rem">
								阅读
							</span>
						</div>
					</div>
				</div>
			</div>
		</div>
			<div class="fui-cell-group fui-cell-click" style="padding:0.5rem">
				<div class="fui-cell" style="padding-bottom:0.5rem;padding-left:0">
					<div class="fui-cell-text bold" style="font-size:0.8rem">详情</div>
				</div>
				<div ng-class="{'content-block content-images':1,'noread':pagedata.item.noread}" style="margin-top:0.3rem" ng-bind-html="trust(pagedata.item.content)"></div>
				<div class="noread-btn" ng-if="pagedata.item.noread">
					<div class="exp-mask"></div>
					<div ng-if="pagedata.item.type!=2" class="weui_cells" style="margin-top:0;">
						<a ng-if="!pagedata.order_id" href="javascript:;" ng-click="pagedata.pay_submit({'video_id':pagedata.item.id},'jy_kexie/video_detail/pay/','jy_kexie/video_detail//id='+pagedata.item.id)" class="weui_btn weui_btn_plain_primary">付费阅读(￥{{pagedata.item.price}})</a>
						<a ng-if="pagedata.order_id" href="javascript:;" ng-click="pagedata.pay(pagedata.order_id)" class="weui_btn weui_btn_plain_primary">付费阅读(￥{{pagedata.item.price}})</a>
					</div>
					<div ng-if="pagedata.item.type==2" class="weui_cells" style="margin-top:0;">
						<a href="javascript:;" ng-click="access_json('jy_kexie/home/buyvip/')" class="weui_btn weui_btn_plain_primary">点击开通(VIP课程)</a>
					</div>
				</div>
			</div>
	</div>
</div>
<div ng-if="pagedata.showhongbao" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="width:100%;background:url('{{tomedia(pagedata.pluginset.o_hongbao) || '../addons/jy_kexie/resource/img/h-480.png'}}') no-repeat;background-size:100% 100%;padding:30px">
		<div class="closebtn" ng-click="pagedata.showhongbao=false" style="top:50px;right:30px"><i class="icon jinyunicon icon-wrong" style="font-size:0.9rem;font-weight:bold"></i></div>
		<div class="fui-cell-group" style="padding:150px 15px 100px 15px;background:none;">				
				<div class="fui-cell noborder">
						<div id="oninput" class="fui-cell-text" style="white-space: nowrap;background:#fff;border-radius:1.2rem;padding:0.1rem 0.5rem">红包金额：<input type="text" class='fui-input' onblur="reset_body()" onkeyup='clearNoNum(this)' placeholder="请输入红包金额" ng-model="pagedata.post.money" style="width:auto;height:1.4rem;" /></div>
				</div>
				<div class="fui-cell noborder" style="margin-top:0;padding-top:0">
					<div class="fui-cell-text name ">
						<span class="fui-tag fui-tag-red-o" style="color:red" ng-click="pagedata.post.money=10">10元红包</span><span class="fui-tag fui-tag-red-o" style="color:red" ng-click="pagedata.post.money=20">20元红包</span><span class="fui-tag fui-tag-red-o" style="color:red" ng-click="pagedata.post.money=50">50元红包</span>
						<span class="fui-tag fui-tag-red-o" style="color:red" ng-click="pagedata.post.money=100">100元红包</span><span class="fui-tag fui-tag-red-o" style="color:red" ng-click="pagedata.post.money=168">168元红包</span>
						<div class="coupon-mini" style="color:#fff;padding:0.2rem">快速选择一个红包发送 <i class="icon jinyunicon icon-yuding" style="font-size:0.5rem;color:#fff"></i></div>
					</div>
				</div>
				<div class="fui-cell noborder" style="padding-top:0;">
						<div class="fui-cell-text" style="white-space: nowrap;background:#fff;border-radius:1.2rem;padding:0.1rem 0.5rem">赠送人：<input type="text" class='fui-input' onblur="reset_body()" placeholder="请输入您的姓名"  ng-model="pagedata.post.username" style="width:auto;height:1.4rem;"/></div>
				</div>
				<div class="fui-cell noborder" style="padding-top:0">
					<div class="fui-cell-info" style="color:#fff"><i class="icon jinyunicon icon-biaoqing" style="color:#fff"></i> 红包金额全部转至发布人账号~</div>
				</div>
				<a ng-click="pagedata.sendhb();" class="btn btn-success block bold" style="bottom:1rem;width:90%;left:5%;background:#FF9900;color:#CC3300;border-radius:1.2rem;height: 2.3rem;line-height: 2.1rem;padding: 0 0.6rem;font-size:1rem">塞钱进红包</a>
		</div>
</div>
</div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<script>
scope.pagedata.pay_submit=function(post,post_url,complete_url){
	scope.post_json(post_url,post,function(result){
		if(result.order_id){
			scope.pagedata.order_id=result.order_id;
			scope.$evalAsync();
			scope.tool.pay(result.pay_id,function(res){
					if(res.type=='success'){
						scope.message('支付成功！','success',complete_url);
					}else{
						scope.message('支付失败！','success',complete_url);
					}
			},'','',complete_url);
		}
	});
}
scope.pagedata.pay=function(id){
	scope.post_json('jy_kexie/video_detail/twopay/',{'id':id},function(pay_id){
		scope.$evalAsync();
		scope.tool.pay(pay_id,function(res){
				if(res.type=='success'){
					scope.message('支付成功！','success','jy_kexie/video_detail//id='+id);
				}else{
					scope.message('支付失败！','success','jy_kexie/video_detail//id='+id);
				}
		},'','','jy_kexie/video_detail//id='+id);
	});
}
</script>